import base from '../utils/base.js'
import * as axios from '../utils/http.js'

const page = {
	//登录
	save(data, callback) {
		return axios.post(`${base.rq}/page/saveSketch`, data,{}).then(res => {
			callback(res);
		}, () => {

		})
	},
    selectPages(data, callback){
        return axios.get(`${base.rq}/page/selectSketchPages`, data,{}).then(res => {
            callback(res);
        }, () => {

        })
    },
    getSketchById(data,callback){
        return axios.get(`${base.rq}/page/getSketchById`, data,{}).then(res => {
            callback(res);
        }, () => {

        })
    },
    publish(data,callback){
        return axios.post(`${base.rq}/page/publish`, data,{}).then(res => {
            callback(res);
        }, () => {

        })
    },
    unpublish(data,callback){
        return axios.post(`${base.rq}/page/unpublish`, data,{}).then(res => {
            callback(res);
        }, () => {

        })
    },
    delete(data,callback){
        return axios.get(`${base.rq}/page/delete`, data,{}).then(res => {
            callback(res);
        }, () => {

        })
    },
	
}

export default page
